$(function (){
    $('#email').on('blur',function (){
       $.ajax({
           type        :"GET",
           url         :"emailExist?email="+this.value,
           success     :function (data){
               console.log(data);
               if(data.email === "Not Exist"){
                   $('#emailTips').attr("class","okTips").text('Available');
               }else{
                   $('#emailTips').attr("class","errorTips").text('Invalid');
               }
           }
       });
    });
});